<template>
    <el-form ref="form"  label-width="80px">
        <el-form-item label="账号">
          <el-input v-model="formData.name"></el-input>
        </el-form-item>
        <el-form-item label="密码">
            <el-input v-model="formData.pwd" type="password"></el-input>
          </el-form-item>
          <el-button type="primary" @click="submit()">登录</el-button>
    </el-form>    
</template>
<script setup>
import {ref} from 'vue'
import axios from 'axios'
const formData=ref({
    name:'',
    pwd:'',
})
const submit=async()=>{
    const res=await axios.post('http://127.0.0.1:3007/login',{name:formData.value.naem,password:formData.value.pwd})
    console.log(res);
}
</script>